package com.sgb.kjwl.model.entity.manage;

import android.text.TextUtils;

import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import com.sgb.link.entity.PickFilterEntity;
import com.swgk.core.util.DateUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

public class WebsiteInfoEntity implements Serializable {

    public String noData = "暂无数据";
    public String noDataY = "--";

    public static final int TYPE_COMPANY_SELF_SUPPORT = 1;

    private String id;
    private String no;//团队no
    //企业编号
    private String companyNo;
    //入驻时间--企业
    private String authTime;
    //入驻时间--团队
    private String createTime;
    //企业名称
    private String name;
    //企业头像
    private String logo;
    //经营类型
    private String serviceType;
    //服务范围
    private String serviceArea;

    //信用评分
    private String score;

    //经营类型名称
    private String serviceTypeName;
    //经营名称数据列表
    private List<String> serviceTypeList;
    //成立日期
    private String establishmentDate;
    //注册资本
    private String registeredCapital;
    //联系人
    private String concat;
    //联系电话
    private String phone;
    //区号
    private String areaCode;
    //固定电话
    private String fixedNumber;
    //电子邮件
    private String email;
    //省级编号
    private String provinceNo;
    private String provinceId;
    //市级编号
    private String cityNo;
    private String cityId;
    //区级编号
    private String districtNo;
    //省名称
    private String provinceName;
    //市名称
    private String cityName;
    //区名称
    private String districtName;
    //详细地址
    private String address;
    private String detailAddress;
    //资质证件
    private String relevantCertificate;
    //资质证件列表
    private List<String> relevantCertificateList;
    //简介
    private String introduction;
    //照片
    private String image;
    //视频ID
    private String video;
    //视频
    private String videoUrl;
    //视频封面
    private String coverUrl;
    //主营业务
    private String mainBusiness;
    //是否开通店铺(1:是)
    private String enabled;
    //经度
    private String longitude;

    private String vrUrl;//vr链接

    public String getVrUrl() {
        return vrUrl;
    }

    public void setVrUrl(String vrUrl) {
        this.vrUrl = vrUrl;
    }

    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    //纬度
    private String latitude;

    public String getNoData() {
        return noData;
    }

    public void setNoData(String noData) {
        this.noData = noData;
    }

    private String MainOtherBusiness;

    public String getNewMainBusinessName() {
        return newMainBusinessName;
    }

    public void setNewMainBusinessName(String newMainBusinessName) {
        this.newMainBusinessName = newMainBusinessName;
    }

    //回显
    private String newMainBusinessName;

    public String getMainOtherBusiness() {
        return mainOtherBusiness;
    }

    public void setMainOtherBusiness(String mainOtherBusiness) {
        this.mainOtherBusiness = mainOtherBusiness;
    }

    private String mainOtherBusiness;
    //地图显示位置
    private String mapAddress;
    //主营业务的ID(v3.6.9)
    private String businessIds;
    //主营业务(V3.6.9)
    private String business;
    //备案单位
    private String recordUnit;
    //备案单位
    private String recordUnitName;
    //经营模式ids
    private String businessModelIds;
    //经营模式名称
    private String businessModel;
    //员工人数
    private String staffNumber;
    //研发部门人数
    private String developerNumber;
    //月产量
    private String monthProduction;
    //月产量单位
    private String unitName;
    //年营业额
    private String annualIncome;
    //市场区域
    private String marketZone;
    //主要客户群体
    private String mainCustomers;
    //主营品牌
    private String majorBrand;
    //是否提供加工/定制服务 null: -- 0:否 1 是
    private String isProcessing;
    //厂房面积
    private String factoryArea;
    //质量控制
    private String qualityControl;
    //管理体系认证IDS
    private String manageAuthIds;
    //管理体系认证
    private String manageAuth;
    //省市区信息
    private String mapArea;
    //地图显示位置详细信息
    private String mapAddressDetail;
    //企业资质编号
    private String companyQualityNo;
    //企业资质名称
    private String companyQualityName;
    //---
    private String industryClassificationName;
    //--
    private String industryClassificationId;
    //行业分类以及名称
    private String industryCategoryOneName;
    //行业分类二级名称
    private String industryCategoryTwoName;
    //经营类型
    private String managementTypeName;
    //行业分类一级ID
    private String industryCategoryOneId;
    //行业分类二级ID
    private String industryCategoryTwoId;
    //经营类型ID
    private String managementTypeId;
    //企业是否自营
    private int selfSupportTag; // 是否自营（0：否 1：是）

    private BusinessInfoEntity businessInfo;//业务类型信息

    public BusinessInfoEntity getBusinessInfo() {
        return businessInfo;
    }

    public void setBusinessInfo(BusinessInfoEntity businessInfo) {
        this.businessInfo = businessInfo;
    }

    private boolean selfSupport;//viewModel使用

    public static class BusinessInfoEntity implements Serializable {
        //业务类型 公共字段
        private String id;
        public String no;
        private String siteType;//网站类型 0-个人 1-企业 2-团队 3-组织
        private int type = -1;//业务类型 生产型 0，研发型 1，贸易型 2，服务型 3，批发型 4，零售型 5
        public String typeName;//业务类型名称
        public String annualIncome;//年营业额
        public String businessModelIds; //经营模式ids
        public String businessModel; //经营模式name
        public String getBusinessModelIds() {
            return businessModelIds;
        }

        public void setBusinessModelIds(String businessModelIds) {
            this.businessModelIds = businessModelIds;
        }

        public String getBusinessModel() {
            return businessModel;
        }

        public void setBusinessModel(String businessModel) {
            this.businessModel = businessModel;
        }


        public List<AddItemEntity> customFields;

        //生产型
        public String productionScope;//生产范围
        public String dayProduction;//日产量
        public String unit;//单位
        public double productionRate;//制成率
        public List<PickFilterEntity> productionArea;//生产区域
        public List<PickFilterEntity> mainMarket;//主营市场
        public String majorBrand;//主营品牌(批发)
        public String factoryArea;//场地面积(贸易型)(批发型)
        public String staffNumber;//员工人数

        public String getIProductionRate() {
            return productionRate + "";
        }

        //研发型
        public String researchRange;//研发范围
        public String researchProduct;//研发产品
        public String researchNum;//研发人数
        public String customerType;//客户类型

        //零售型
        public String retailOrder;//零售订单
        public String retailStores;//零售门店
        public String monthTurnover;//月营业额
        public String retailScope;//零售范围
        public List<PickFilterEntity> retailArea;//零售地区
        public String retailBrand;//零售品牌

        //服务型
        public String serviceScope; //服务范围
        public String serviceCustomer;//服务客户
        public String serviceType;//服务类型
        public List<PickFilterEntity> serviceArea;//服务地区或者(研发)服务地区

        //贸易型
        public String tradeScope; //贸易范围
        public String tradeAmount; //贸易量
        public List<PickFilterEntity> tradeRegion; //贸易地区
        public String tradeBrand; //贸易品牌

        //批发型
        public String wholesaleScope;//批发范围
        public String wholesaleOrder;//批发订单
        public String purchaseOrder;//采购订单
        public List<PickFilterEntity> wholesaleArea; //批发地区


        public void setType(int type) {
            this.type = type;
        }

        public int getType() {
            return type;
        }

        public String getNames (List < PickFilterEntity > list) {
            if (list == null || list.isEmpty()) {
                return "";
            }

            StringBuilder sb = new StringBuilder("");
            for (PickFilterEntity entity : list) {
                sb.append(entity.getName() + ",");
            }
            return sb.substring(0, sb.length() - 1);
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getRate() {
            String rate = productionRate + "";
            if (rate.contains(".")){
                String substring = rate.substring(rate.indexOf(".") + 1, (productionRate + "").length());
                try {
                    if (Integer.parseInt(substring) == 0){
                        return rate.substring(0, rate.indexOf("."));
                    }
                } catch (Exception e){
                    return rate;
                }

            }
            return productionRate + "";
        }
    }


    /**
     * 民族
     */
    private String nation;

    /**
     * 籍贯
     */
    private String nativePlace;

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getNativePlace() {
        return nativePlace;
    }

    public void setNativePlace(String nativePlace) {
        this.nativePlace = nativePlace;
    }

    public int getSelfSupportTag() {
        return selfSupportTag;
    }

    public void setSelfSupportTag(int selfSupportTag) {
        this.selfSupportTag = selfSupportTag;
    }

    public boolean isSelfSupport() {
        return selfSupportTag == TYPE_COMPANY_SELF_SUPPORT;
    }

    /**
     * 用户编号
     */
    private String userNo; //函询接收人(只有团队返回)
    /**
     * 真实姓名
     */
    private String realName;
    /**
     * 性别 1男 0女
     */
    public static final int USER_GENDER_MAN = 1;
    public static final int USER_GENDER_WOMEN = 0;
    private int sex;
    private String sexName;
    /**
     * 联系电话
     */
    private String telephone;
    /**
     * 生日
     */
    private String birthday;
    /**
     * 企业名称
     */
    private String companyName;
    /**
     * 职位
     */
    private String position;
    /**
     * 个性签名
     */
    private String personalSignature;

    /**
     * 个人信息编辑传参
     */
    private String personId;

    public String getPersonId() {
        return personId;
    }

    public void setPersonId(String personId) {
        this.personId = personId;
    }

    //团队字段

    private String businessAddress;//所在区域
    private String businessType; //经营类型

    private String scale;//团队人数
    private String teamDes;//团队描述
    private String contact;//团队联系人
    private List<String> serviceCityName;//团队市场区域

    //组织字段
    private String relationOrganizationNo;//组织no
    private String organizationName;//组织名称
    private String institutionalTypeNo;//机构类型no
    private String institutionalTypeName;//机构类型名称
    private String registrationDepartment;//登记管理部门
    private String contactPerson;//联系人
    private String contactPhone;//联系人手机
    private String businessScope;//经营范围
    private String fixedPhone;//固定电话
    private String organizers;//举办单位
    private String purpose;//宗旨

    public String getFixedPhone() {
        return fixedPhone;
    }

    public void setFixedPhone(String fixedPhone) {
        this.fixedPhone = fixedPhone;
    }

    public String getOrganizers() {
        return organizers;
    }

    public void setOrganizers(String organizers) {
        this.organizers = organizers;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getInstitutionalTypeNo() {
        return institutionalTypeNo;
    }

    public void setInstitutionalTypeNo(String institutionalTypeNo) {
        this.institutionalTypeNo = institutionalTypeNo;
    }

    public String getRelationOrganizationNo() {
        return relationOrganizationNo;
    }

    public void setRelationOrganizationNo(String relationOrganizationNo) {
        this.relationOrganizationNo = relationOrganizationNo;
    }

    public String getOrganizationName() {
        if (TextUtils.isEmpty(organizationName)) {
            return "";
        }
        return organizationName;
    }

    public void setOrganizationName(String organizationName) {
        this.organizationName = organizationName;
    }

    public String getInstitutionalTypeName() {
        return institutionalTypeName;
    }

    public void setInstitutionalTypeName(String institutionalTypeName) {
        this.institutionalTypeName = institutionalTypeName;
    }

    public String getRegistrationDepartment() {
        return registrationDepartment;
    }

    public void setRegistrationDepartment(String registrationDepartment) {
        this.registrationDepartment = registrationDepartment;
    }

    public String getContactPerson() {
        return contactPerson;
    }

    public void setContactPerson(String contactPerson) {
        this.contactPerson = contactPerson;
    }

    public String getContactPhone() {
        return contactPhone;
    }

    public void setContactPhone(String contactPhone) {
        this.contactPhone = contactPhone;
    }

    public String getBusinessScope() {
        return businessScope;
    }

    public void setBusinessScope(String businessScope) {
        this.businessScope = businessScope;
    }

    public String getScale() {
        return scale;
    }

    public void setScale(String scale) {
        this.scale = scale;
    }

    public String getTeamDes() {
        return teamDes;
    }

    public void setTeamDes(String teamDes) {
        this.teamDes = teamDes;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public List<String> getServiceCityName() {
        return serviceCityName;
    }

    public void setServiceCityName(List<String> serviceCityName) {
        this.serviceCityName = serviceCityName;
    }

    public String getBusinessAddress() {
        return businessAddress;
    }

    public void setBusinessAddress(String businessAddress) {
        this.businessAddress = businessAddress;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public List<String> getServiceTypeList() {
        return serviceTypeList;
    }

    public String getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(String provinceId) {
        this.provinceId = provinceId;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public String getRealName() {
        if (TextUtils.isEmpty(realName)) {
            return "";
        }
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getSexName() {
        if (USER_GENDER_WOMEN == sex) {
            sexName = "女";
        } else {
            sexName = "男";
        }
        return sexName;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getBirthday() {
        if (TextUtils.isEmpty(birthday) || "0".equals(birthday)) {
            birthday = "";
        }
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getPersonalSignature() {
        return personalSignature;
    }

    public void setPersonalSignature(String personalSignature) {
        this.personalSignature = personalSignature;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public List<String> getRelevantCertificateList() {
        return relevantCertificateList;
    }

    public void setRelevantCertificateList(List<String> relevantCertificateList) {
        this.relevantCertificateList = relevantCertificateList;
    }

    public String getRecordUnitName() {
        return recordUnitName;
    }

    public void setRecordUnitName(String recordUnitName) {
        this.recordUnitName = recordUnitName;
    }

    public String getManageAuthIds() {
        return manageAuthIds;
    }

    public void setManageAuthIds(String manageAuthIds) {
        this.manageAuthIds = manageAuthIds;
    }

    public String getFixedNumber() {
        return fixedNumber;
    }

    public void setFixedNumber(String fixedNumber) {
        this.fixedNumber = fixedNumber;
    }

    public String getCompanyQualityNo() {
        return companyQualityNo;
    }

    public void setCompanyQualityNo(String companyQualityNo) {
        this.companyQualityNo = companyQualityNo;
    }

    public String getIndustryClassificationId() {
        return industryClassificationId;
    }

    public void setIndustryClassificationId(String industryClassificationId) {
        this.industryClassificationId = industryClassificationId;
    }

    public String getManageAuth() {
        return manageAuth;
    }

    public void setManageAuth(String manageAuth) {
        this.manageAuth = manageAuth;
    }

    public String getIndustryCategoryOneName() {
        return industryCategoryOneName;
    }

    public void setIndustryCategoryOneName(String industryCategoryOneName) {
        this.industryCategoryOneName = industryCategoryOneName;
    }

    public String getBusinessModelIds() {
        return businessModelIds;
    }

    public void setBusinessModelIds(String businessModelIds) {
        this.businessModelIds = businessModelIds;
    }

    public String getMarketZone() {
        return marketZone;
    }

    public void setMarketZone(String marketZone) {
        this.marketZone = marketZone;
    }

    public String getIndustryCategoryTwoName() {
        return industryCategoryTwoName;
    }

    public void setIndustryCategoryTwoName(String industryCategoryTwoName) {
        this.industryCategoryTwoName = industryCategoryTwoName;
    }

    public String getLogo() {
        if (logo == null || "null".equals(logo)) {
            logo = "";
        }
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getFactoryArea() {
        return factoryArea;
    }

    public void setFactoryArea(String factoryArea) {
        this.factoryArea = factoryArea;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getDeveloperNumber() {
        return developerNumber;
    }

    public void setDeveloperNumber(String developerNumber) {
        this.developerNumber = developerNumber;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getConcat() {
        return concat;
    }

    public void setConcat(String concat) {
        this.concat = concat;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getMapAddressDetail() {
        return mapAddressDetail;
    }

    public void setMapAddressDetail(String mapAddressDetail) {
        this.mapAddressDetail = mapAddressDetail;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getName() {
        if (TextUtils.isEmpty(name)) {
            return "";
        }
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRecordUnit() {
        return recordUnit;
    }

    public void setRecordUnit(String recordUnit) {
        this.recordUnit = recordUnit;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getServiceTypeName() {
        return serviceTypeName;
    }

    public void setServiceTypeName(String serviceTypeName) {
        this.serviceTypeName = serviceTypeName;
    }

    public List<String> getServiceTypeList(int size) {
        if (serviceTypeList == null) {
            serviceTypeList = new ArrayList<>();
        }
        if (!TextUtils.isEmpty(serviceTypeName)) {
            String[] strs = serviceTypeName.split(",");
            for (String str : strs) {
                if (serviceTypeList.size() < size) {
                    serviceTypeList.add(str);
                } else {
                    break;
                }
            }
            if (strs.length > size) {
                serviceTypeList.add("");
            }
        }
        return serviceTypeList;
    }

    public void setServiceTypeList(List<String> serviceTypeList) {
        this.serviceTypeList = serviceTypeList;
    }

    public String getIndustryClassificationName() {
        return industryClassificationName;
    }

    public void setIndustryClassificationName(String industryClassificationName) {
        this.industryClassificationName = industryClassificationName;
    }

    public String getMonthProduction() {
        return monthProduction;
    }

    public void setMonthProduction(String monthProduction) {
        this.monthProduction = monthProduction;
    }

    public String getIndustryCategoryTwoId() {
        return industryCategoryTwoId;
    }

    public void setIndustryCategoryTwoId(String industryCategoryTwoId) {
        this.industryCategoryTwoId = industryCategoryTwoId;
    }

    public String getAnnualIncome() {
        return annualIncome;
    }

    public void setAnnualIncome(String annualIncome) {
        this.annualIncome = annualIncome;
    }

    public String getEstablishmentDate() {
        return establishmentDate;
    }

    public void setEstablishmentDate(String establishmentDate) {
        this.establishmentDate = establishmentDate;
    }

    public String getBusinessModel() {
        return businessModel;
    }

    public void setBusinessModel(String businessModel) {
        this.businessModel = businessModel;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getIsProcessing() {
        return isProcessing;
    }

    public void setIsProcessing(String isProcessing) {
        this.isProcessing = isProcessing;
    }

    public String getMainBusiness() {
        return mainBusiness;
    }

    public void setMainBusiness(String mainBusiness) {
        this.mainBusiness = mainBusiness;
    }

    public String getVideo() {
        return video;
    }

    public void setVideo(String video) {
        this.video = video;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getCoverUrl() {
        return coverUrl;
    }

    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }

    public String getQualityControl() {
        return qualityControl;
    }

    public void setQualityControl(String qualityControl) {
        this.qualityControl = qualityControl;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getRegisteredCapital() {
        return registeredCapital;
    }

    public void setRegisteredCapital(String registeredCapital) {
        this.registeredCapital = registeredCapital;
    }

    public String getDistrictNo() {
        return districtNo;
    }

    public void setDistrictNo(String districtNo) {
        this.districtNo = districtNo;
    }

    public String getProvinceNo() {
        return provinceNo;
    }

    public void setProvinceNo(String provinceNo) {
        this.provinceNo = provinceNo;
    }

    public String getIndustryCategoryOneId() {
        return industryCategoryOneId;
    }

    public void setIndustryCategoryOneId(String industryCategoryOneId) {
        this.industryCategoryOneId = industryCategoryOneId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRelevantCertificate() {
        return relevantCertificate;
    }

    public void setRelevantCertificate(String relevantCertificate) {
        this.relevantCertificate = relevantCertificate;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getBusinessIds() {
        return businessIds;
    }

    public void setBusinessIds(String businessIds) {
        this.businessIds = businessIds;
    }

    public String getMapArea() {
        return mapArea;
    }

    public void setMapArea(String mapArea) {
        this.mapArea = mapArea;
    }

    public String getCityNo() {
        return cityNo;
    }

    public void setCityNo(String cityNo) {
        this.cityNo = cityNo;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getBusiness() {
        return business;
    }

    public void setBusiness(String business) {
        this.business = business;
    }

    public String getDistrictName() {
        return districtName;
    }

    public void setDistrictName(String districtName) {
        this.districtName = districtName;
    }

    public String getManagementTypeName() {
        return managementTypeName;
    }

    public void setManagementTypeName(String managementTypeName) {
        this.managementTypeName = managementTypeName;
    }

    public String getMainCustomers() {
        return mainCustomers;
    }

    public void setMainCustomers(String mainCustomers) {
        this.mainCustomers = mainCustomers;
    }

    public String getManagementTypeId() {
        return managementTypeId;
    }

    public void setManagementTypeId(String managementTypeId) {
        this.managementTypeId = managementTypeId;
    }

    public String getStaffNumber() {
        return staffNumber;
    }

    public void setStaffNumber(String staffNumber) {
        this.staffNumber = staffNumber;
    }

    public String getCompanyQualityName() {
        return companyQualityName;
    }

    public void setCompanyQualityName(String companyQualityName) {
        this.companyQualityName = companyQualityName;
    }

    public String getMajorBrand() {
        return majorBrand;
    }

    public void setMajorBrand(String majorBrand) {
        this.majorBrand = majorBrand;
    }

    public String getMapAddress() {
        return mapAddress;
    }

    public void setMapAddress(String mapAddress) {
        this.mapAddress = mapAddress;
    }


    public String getAuthTime() {
        long time = 0;
        if (!TextUtils.isEmpty(authTime)) {
            time = Long.valueOf(authTime);
        } else if (!TextUtils.isEmpty(createTime)) {
            time = Long.valueOf(createTime);
        }
        return DateUtils.timestampToDate(time) + " 入驻";
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setAuthTime(String authTime) {
        this.authTime = authTime;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getServiceArea() {
        return serviceArea;
    }

    public void setServiceArea(String serviceArea) {
        this.serviceArea = serviceArea;
    }

    public String getScore() {
        return score;
    }

    public void setScore(String score) {
        this.score = score;
    }

    public String getReallyScore() {
        if (TextUtils.isEmpty(score)) return "-";
        String reallyScore = "" + score;
        if (reallyScore.length() > 5) {
            if (reallyScore.substring(0, 5).contains(".")) {
                if (reallyScore.length() >= 7) {
                    return (reallyScore.substring(0, 7)) + "...";
                }
            }
            return (reallyScore.substring(0, 5)) + "...";
        }
        return "" + score;
    }

    public String getStringOutE(){
        if (TextUtils.isEmpty(score)) return score;
        BigDecimal bd = new BigDecimal(score);
        return bd.toPlainString();
    }

    public static class ServiceAreaEntity {
        public String id;

        @SerializedName(value = "name", alternate = "serviceClass")
        public String name;
    }

    public String getServiceAreaNames() {
        if (TextUtils.isEmpty(serviceArea)) {
            return "";
        }
        try {
            List<WebsiteInfoEntity.ServiceAreaEntity> list = new Gson().fromJson(serviceArea, new TypeToken<List<ServiceAreaEntity>>() {
            }.getType());
            if (list != null && !list.isEmpty()) {
                StringBuilder sb = new StringBuilder("");
                for (ServiceAreaEntity entity : list) {
                    sb.append(entity.name + ",");
                }
                return sb.substring(0, sb.length() - 1);
            }
        } catch (Exception e) {

        }
        return "";
    }
}
